/**
 * @file
 * @author dousha
 * @date 2020-06-21
 */

#ifndef QUATERNION_H
#define QUATERNION_H

/**
 * 表示一个四元数
 */
typedef struct {
    float h;
    float i;
    float j;
    float k;
} Quaternion;

extern void quaternion_from_euler_angle(Quaternion *, float, float, float, float);

extern void quaternion_add(Quaternion *, const Quaternion *);

extern void quaternion_subtract(Quaternion *, const Quaternion *);

extern void quaternion_multiply(Quaternion *, const Quaternion *);

extern float quaternion_length(const Quaternion *);

extern float quaternion_euler_angle_x(const Quaternion *);

extern float quaternion_euler_angle_y(const Quaternion *);

extern float quaternion_euler_angle_z(const Quaternion *);

#endif
